// 导入表格组件和表格列组件
import { install } from '../helpers';
import Table from './Table.vue';
import TableColumn from './TableColumn.vue';
import type { TableProps, TableColumnProps, TableSortState } from './types';

// 组件列表
const TuiTableComponents = {
  'tui-table': Table,
  'tui-table-column': TableColumn
};

// 安装函数
const tableInstall = (app: any) => {
  install(app, TuiTableComponents);
};

// 导出组件和安装函数
export { Table, TableColumn, tableInstall, TuiTableComponents };

export default {
  tableInstall,
  ...TuiTableComponents
};

// 导出类型
export type { TableProps, TableColumnProps,  TableSortState };